/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ua.yandex.sumofseries.utilconcurrent;

/**
 *
 * @author vlad
 */
public class Benchmarker {
    
    private long millis;
    private long start;
    
    public Benchmarker() {
        reset();
    }
    
    public long getCurrentTime() {
        return millis;
    }
    
    public void start() {
        this.start = System.currentTimeMillis();
    }
    
    public void stop() {
        long stop = System.currentTimeMillis();
        this.millis += stop - start;
    }
    
    public final void reset() {
        millis = 0;
    }
}
